﻿using WH.Common.Constant;

namespace WH.Contracts.Handler
{
    /// <summary>
    /// 登录的用户实体
    /// </summary>
    public class JwtTokenModel
    {
        /// <summary>
        /// 
        /// </summary>
        public string? Id { get; set; }
        /// <summary>
        /// 岗位ID
        /// </summary>
        public string DutyId { get; set; } = string.Empty;

        /// <summary>
        /// 
        /// </summary>
        public string HeadImg { get; set; } = BusinessFunction.DefaultAvatarSrc;

        /// <summary>
        /// 是否管理员
        /// </summary>
        public bool IsAdmin => UserAccount.Equals("admin");

        /// <summary>
        /// 昵称
        /// </summary>
        public string NickName { get; set; } = string.Empty;

        /// <summary>
        /// 手机号码 11位
        /// </summary>
        public string PhoneNumber { get; set; } = string.Empty;

        /// <summary>
        /// 头像
        /// </summary>
        /// <summary>
        /// 微信OPENID
        /// </summary>
        public string OpenId { get; set; } = string.Empty;

        /// <summary>
        /// 真实姓名
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 角色ID
        /// </summary>
        public string RoleId { get; set; } = string.Empty;

        /// <summary>
        /// 用户Id
        /// </summary>
        public string UserId { get; set; } = string.Empty;

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserAccount { get; set; } = string.Empty;

        /// <summary>
        /// 机构Id
        /// </summary>
        public string OrganizationId { get; set; } = string.Empty;

        public string Policy { get; set; } = string.Empty;
    }
}